package com.myblog.demo.mapper;

import com.myblog.demo.entity.vo.CommentInfoVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.security.core.parameters.P;

import java.util.List;

@Mapper
public interface CommentMapper {
    List<CommentInfoVO> getCommentsList(@Param("aid") Integer aid);

    int addComment(@Param("uid") Integer uid, @Param("aid") Integer aid, @Param("content") String content);

    int delCommentById(@Param("id") Integer id, @Param("uid") Integer uid, @Param("aid") Integer aid);

    // 获取某种作者获得的所有评论数量
    int getTotalCommentsByUid(@Param("uid") Integer uid);
}
